const os = require('os');

// const cpuStat = require('cpu-stat');
// cpuStat.usagePercent((err, percent)=>{
//   console.log(`CPU占用:${percent.toFixed(2)}%`)
// })

const showStat = () => {
  const mem = os.freemem() / os.totalmem() * 100;
  console.log(`内存占用：${mem.toFixed(2)}%`);
}

module.exports = {
  showStat
}